import { createApp } from "vue";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import App from "./App.vue";
import { createPinia } from "pinia";
import router from "./router/router.ts";
import "./styles/common.scss";
import { lazyPlugin } from "./directives";
import { componentPlusin } from "./components";
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";

const app = createApp(App);
const pinia = createPinia();

// 注册pinia持久化插件
pinia.use(piniaPluginPersistedstate);

app.use(pinia);
app.use(router);
app.use(ElementPlus);
//注册懒加载插件
app.use(lazyPlugin);
// 注册全局组件插件
app.use(componentPlusin);
app.mount("#app");
